package com.learn.dubbo.web.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.dubbo.config.annotation.Reference;
import com.learn.dubbo.entity.log.SysLog;
import com.learn.dubbo.log.service.LogRemoteService;


@Controller
@RequestMapping("/log")
public class LogController {
	
	private static final Logger logger = LoggerFactory.getLogger(LogController.class);
	
	@Reference
	private LogRemoteService logRemoteService;
	
	@RequestMapping("/")
	public String goIndex(){
		return "index";
	}
	
	@RequestMapping("/list")
	@ResponseBody
	public SysLog getSysLogInfo(){
		return logRemoteService.getSysLogInfo(1L);
	}

}
